<?php

class LoginForm extends BaseForm {

    public function configure() {
        $this->setWidgets(array(
            'username' => new sfWidgetFormInput(array(), array('placeholder' => 'Username')),
            'password' => new sfWidgetFormInputPassword(array(), array('placeholder' => 'Password')),
            'stay' => new sfWidgetFormSelectCheckbox(array('choices' => array('online' => 'Stay signed in'))),
        ));
                
        $this->setValidators(array(
            'username' => new sfValidatorEmail(),
        ));
        
        $this->widgetSchema->setNameFormat('logins[%s]');
    }

}
?>